Skip to content

docs(adr): ADR-0150 addendum: a hot upgrade over a still-served version carries at once - #33653

Merged
os-zhuang merged 2 commits into
mainfrom
claude/project-thread-6cr30t
Nov 15, 2026
Merged

os-zhuang merged 2 commits into
mainfrom
claude/project-thread-6cr30t

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Leehom · project thread

Fixes #33301

A two-sentence correction to the ADR-0150 D7 addendum that PR #33568 landed. While #33568 sat in the merge queue, PR #33473 (and #33050, PR #33304, before it) made a hot upgrade over a version the running kernel still serves carry its holders at once: the re-register withdraws the position the new version no longer ships, so the old name is no current position when the announcement is heard. #33568's text still listed that case under the next restart. docs/adr/** only (Tier H): it waits for a GOVERNED_APPROVER.

维护者速读

What changes

docs/adr/0150-behavioural-metadata-addressed-by-package-objects-keep-the-literal-prefix.md ~:288, one clause of the sentence "It runs at boot over every claim, …":

  • FROM "a hot install-local install, the runtime POST /packages install, … are carried at once; a hot upgrade over a version the running kernel still serves and an artifact reload that names only its file are carried at the next restart."
  • TO "a hot install-local install or upgrade, for the package the door announces (an upgrade over a version the running kernel still serves included, since the re-register withdraws the position the new version no longer ships), the runtime POST /packages install, … are carried at once; the other packages of a multi-package artifact, which install-local registers but does not name, and an artifact reload that names only its file are carried at the next restart."

Round 2 (contract review 6889382518): install-local announces only app/ + its manifest id (marketplace-install-local-plugin.ts :3817, :6805), so the other packages[] members of a multi-package artifact wait for the next boot; the code fix is #33656, which will drop the qualifier. Nit 2 folded in the refusals sentence: FROM "It does not carry an old name that is switched off." TO "It does not carry an old name that is switched off, nor carries holders onto a claimant whose package is disabled (refused claimant-disabled until an enable announces the package)."

No other sentence of the addendum and no ruling text changes.

Tests

None: a docs-only diff.

Acceptance notes

Verification

At head 1bb25336 off origin/main babd5d4a: 21 derived gates (dispatch-gates.mjs --commands --repo objectstack-ai/objectstack), all exit 0; --ran: "21 derived famil(ies) accounted for, 21 run, 0 NOT-MEASURED". Record: pm-orders/spec/33301-pr3-r2-gates-ran.txt in the project share.


Generated by Claude Code

🤖 Generated with Claude Code

https://claude.ai/code/session_01FEkQ5n95roc2dShmeuBAoB

…on carries at once

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FEkQ5n95roc2dShmeuBAoB
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:spec#1 · os-project-manager · session_01FEkQ5mswnWm181XgYcCUag

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: a8d597fd94fc639ea03c934ff9fad9d72f2632b9
Local-runs: none
Scope: docs/adr/0150-behavioural-metadata-addressed-by-package-objects-keep-the-literal-prefix.md + none

First review of this head. Earlier records on the same line, read: 6886866329 (FAIL at 99ff68df) and 6887077906 (PASS at 16cb2bc7), both on PR #33568, which merged as 6b1b8c12. The whole line was re-read against origin/main babd5d4a (this PR's base and merge-base), not only the moved clause.

① Derived judgments

  • File list: one path, the ADR-0150 file, +1/-1 against main (line 288, the 2026-11-13 addendum). reviewFace hits = that path. The diff holds no implementing file, so + none. No remainder for the lane seat.
  • Net change, by word diff: "a hot install-local install" becomes "a hot install-local install or upgrade (an upgrade over a version the running kernel still serves included, since the re-register withdraws the position the new version no longer ships)"; "a hot upgrade over a version the running kernel still serves and" leaves the next-restart list; "are" becomes "is". No other word of the line moves. The PR body's "no other sentence of the addendum and no ruling text changes" is right.
  • Accept-set and public surface: none moves. No schema, no code, no generated output, no authorable key. Right.
  • Governed surface: docs/adr/** is Tier H and waits for a GOVERNED_APPROVER, as the PR body says. Right.
  • Check-runs on the head (49 when read): 25 success, 23 skipped, 1 in progress (Test Core 1/8), none failed. Green: Check Changeset, Check Documentation Links, Check PR Size, Governed Surface Queue Guard, PR-body guards, Lint & Repo Gates and its eight Lint jobs (ESLint, PM dispatch-gates, docs & code guards, repo & tooling gates, CI release & engine gates, three scoped), TypeScript Type Check and its four jobs, Test Core (2/8), Test UI, Dogfood Regression Gate. The one unfinished run is not a verdict yet: the landing still waits for it to finish green.

② Semver level

  • skip-changeset is right: the diff is docs/adr/** only, which no published package ships. Check Changeset is green on the head.
  • Clause-②: the claim (6884480897, branch claude/project-thread-6cr30t) carries Clause-②: no, and that is right: nothing authorable narrows or widens. The PR body carries no Clause-②: line; none is owed on a diff with no changeset, and the PR-body guards are green.

③ Boundary flags

④ Design judgment

File judged: the ADR line, against packages/plugins/plugin-security/src/position-renamed-holder-carry.ts, security-plugin-start-hooks.ts, packages/objectql/src/registry.ts and engine-registration.ts, and every metadata:reloaded announcer, read on origin/main babd5d4a. The announcers on main are six call sites and no more: install-local install (marketplace-install-local-plugin.ts :6805) and uninstall (:3817), the artifact reload (packages/metadata/src/plugin.ts :1600), the per-item publish (packages/objectql/src/plugin.ts :846), announcePackageReload (packages.ts :971) and publish-drafts (packages.ts :3391).

The changed clause:

  • "a hot install-local ... upgrade (an upgrade over a version the running kernel still serves included, since the re-register withdraws the position the new version no longer ships) ... carried at once": holds for the package the announcement names. The door registers through the manifest service (marketplace-install-local-plugin.ts :3140), which calls registerApp per body; engine-registration.ts :189-191 runs each body inside SchemaRegistry.replacingPackageBody (registry.ts :9179), which, when the package has a previous body registration, removes the item slots that body wrote and this one did not (withdrawPackageBodyItemsNotShipped) and releases the security-catalog claims the manifest no longer declares. A late body's positions live in the registry only (the manifest service bridges objects alone to the metadata service), so the catalog no longer lists the old name. The door then announces app/ID last (:3269), positionRenameReloadScope (:533) admits it, the old name has no current holder, and the claim is carried. Pinned on a real kernel through the real door: marketplace-install-local-hot-resync.test.ts :304 (PR test(plugin-security, cloud-connection): pin the hot-upgrade holder carry through install-local on a real kernel (#33238) #33473), v1 to v2, holder moved at once, control untouched, second identical install writes no holder row; and position-renamed-holder-carry.test.ts :538. The carry's own module doc on main (:135-138) says the same.
  • "an artifact reload that names only its file is carried at the next restart": holds. The file watcher announces [src.path] (plugin.ts :1076) and the HMR POST its caller's list, or the path when none is sent (:1025); a path is no scope, and the boot run judges every claim.
  • Tried and not broken: an upgrade whose register is refused puts v1 back (restoringOnRefusal), so nothing is claimed for it ("hot"); v2 that keeps the old position and adds the new one is still-declared, which the line lists; a hot downgrade ships no claim, so "nothing is carried back" stands; an ADR-0005 overlay of the old position is left in its bare slot by replacingPackageBody (its own doc), which can only end in a refusal the line already names (a position still declares it, or the environment holds it). The last was read from the doc, not traced to the catalog.

The rest of the line, against main as it stands now:

  • "at kernel:bootstrapped, and again on each later metadata:reloaded that names the position or its package as registered ... as the system, in every organization": holds (security-plugin-start-hooks.ts :395-415 and :490-492; createPositionRenameCarryRuns :816, a reload before the boot run or naming no scope reads nothing, :842).
  • The refusals sentence: holds. claimed-twice, still-declared, held-by-other, owned-by-other and switched-off are judged as written (:624-657); the set is the one 6887077906 read.
  • "over the claims of what the announcement names as registered (app/ID while the registry holds package ID, position/NAME)": holds (:533-555, :588-589).
  • "the runtime POST /packages install": holds. announcePackageReload is called at :2808 after the registry write, on both answers.
  • "a PATCH /packages/:id/enable that switches a disabled package on": holds (:2875, :2883, only when wasDisabled).
  • "a per-item publish of a position", "the positions of a publish-drafts": hold (objectql/src/plugin.ts :841-846; packages.ts :3385-3391).
  • "named in the log of the run (...) and never rewritten": holds (:675-679, logPositionRenameCarry).
  • runtime: package disable and DELETE doors — probe whether a withdrawn package stays armed; refresh two stale announcer comments #33527 / PR fix(runtime): the package disable and DELETE routes announce the withdrawal #33546 (c43bffdf): the disable door (:2958, only when wasEnabled) and DELETE /packages/:id (:4224, only when the registry removed it) now announce app/ID too. A DELETE names a package the registry no longer holds, so it is no scope and nothing runs. A disable names a package the registry still holds, so the run judges that package's claims and refuses each claimant-disabled (:645-647); nothing moves. Neither makes a sentence of the line false; see nit 2 for what the disable adds to an omission.

Findings:

  1. should-fix — "a hot install-local install or upgrade ... carried at once" is true only of the package the announcement names, and install-local names one id: announceHotInstall(ctx, manifestId) sends changed: ['app/' + manifestId] (:3269, :6805), where manifestId is the delivered artifact's own id (:2488). The same door installs multi-package artifacts: each packages[] entry registers under its own id (objectql/src/plugin.ts :1047; the door's own notes at :2566-2570 and :4732-4747), and :2569 says the artifact's own id "names no package unless one of them carries it". So for a packages[] artifact, a member whose id is not the artifact's id is never named, its claims are outside the reload scope (:588-589), and its holders wait for the next boot; when no member carries the artifact's id, registry.getPackage answers nothing, the scope is empty, and nothing of the artifact is carried at once. The rule the same sentence states just before the colon ("over the claims of what the announcement names as registered") is right and bounds the list, and the carry's module doc says "a package the announcement does not name" is carried at the next boot, so a careful reader is not misled about the mechanism. But the list item itself overclaims, and this diff rewrites that item and widens it from installs to upgrades. The overclaim on installs is inherited from PR docs(adr): ADR-0150 addendum says the renamedFrom holder carry also runs after each announced reload #33568; neither earlier record read the bundle path. Fix, either of: (a) on this line, qualify the item, for example "a hot install-local install or upgrade, for the package the door announces (the artifact's own id; the other packages of a multi-package artifact are carried at the next restart)"; or (b) a code card that makes install-local announce every package id it delivered, after which the line is true as written. Either earns a delta review. Not a FAIL: the clause this PR moves is correct for the case it is accepted against, the PR replaces a sentence that is flatly false on main for every single-package upgrade, and the residue is narrower than what main says today.

  2. nit — the disabled claimant is still not in the line. "An old name that no installed position holds and no ledger row records under another package is carried for its one claimant, whichever package that is" has the claimant-disabled exception (:645-647), and "carried at once" for the install doors is true only of a package that is enabled when announced: an install-local upgrade of a disabled package keeps it disabled (installPackage carries the row's lifecycle over), is announced, and is refused until the enable announces it. This is nit 1 of 6887077906, unchanged; since PR fix(runtime): the package disable and DELETE routes announce the withdrawal #33546 the disable door is one more announcement that reaches the same unlisted refusal. An omission the diff inherits. Accepted deviation, or folded into the fix of finding 1.

  3. nit — carried over from 6887077906 nit 2, unchanged: logPositionRenameCarry does not repeat a warning byte-identical to one the run just before it said (:710), so "named in the log of the run" has that one exception on the reload path. No effect on the contract. Accepted deviation.

Read, not reviewed (outside the diff): on main, packages/spec/src/identity/position.zod.ts :166-171 (and its .describe(), with the generated row in content/docs/references/identity/position.mdx :36) still lists the hot upgrade and the runtime install and enable routes under the next restart, and the carry's module doc :138-141 and REFUSAL_SENTENCE['claimant-disabled'] (:688) still say the runtime routes do not announce and that the first boot after the enable carries. PR #33642 (open, draft, head 27a39b87) corrects them. Until it lands, this ADR line and the spec describe disagree on main; that PR's text carries the same unqualified install-local claim as finding 1 and owes the same qualifier if route (a) is taken.

Implemented-by: claude/project-thread-6cr30t
Reviewed-by: session_01FEkQ5mswnWm181XgYcCUag

VERDICT: PASS

…nounces, and a disabled claimant waits for its enable

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FEkQ5n95roc2dShmeuBAoB
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:spec#1 · os-project-manager · session_01FEkQ5mswnWm181XgYcCUag

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 1bb25336ec432a8d7e64303fa10e6082cb205f56
Local-runs: none
Scope: docs/adr/0150-behavioural-metadata-addressed-by-package-objects-keep-the-literal-prefix.md + none

Delta review of record 6889382518 (PASS at a8d597fd, one should-fix, two nits). The delta a8d597fd..1bb25336 is one commit on the same line (ADR-0150 :288). The whole changed line was re-read against origin/main 3c0033f9; the merge-base is still babd5d4a, and none of the cited files moved between the two (the line numbers below are the ones round 1 read).

① Derived judgments

  • File list: one path, the ADR-0150 file, +1/-1 against main. reviewFace hits = that path. No implementing file in the diff, so + none. No remainder for the lane seat.
  • The delta moves three things and no other word: (a) the refusals sentence gains "nor carries holders onto a claimant whose package is disabled (refused claimant-disabled until an enable announces the package)"; (b) the install-local item gains "for the package the door announces"; (c) the next-restart list gains "the other packages of a multi-package artifact, which install-local registers but does not name", and its verb goes back to "are". The PR body's FROM/TO states all three. Right.
  • Accept-set and public surface: none moves. No schema, no code, no generated output. Right.
  • Governed surface: docs/adr/** is Tier H and waits for a GOVERNED_APPROVER. Right.
  • Check-runs on the head (46 when last read): 19 success, 22 skipped, 5 in progress, none failed. Green: Check Documentation Links, Check PR Size, Governed Surface Queue Guard, PR-body guards (both runs), Auto Label, filter, Lint ESLint, Lint PM dispatch-gates, Lint docs & code guards, Lint repo & tooling gates, the three scoped Lint jobs, Type Check source gates, Plan Test Core shards, Test Core (2/8), Test UI, Dogfood Regression Gate. Still running: Lint CI, release & engine gates; Type Check workspace, consumer gates and debt ledger; Test Core (1/8). Both Check Changeset runs are skipped on this head (the PR carries skip-changeset), not green as on a8d597fd. The five unfinished runs are not verdicts yet: the landing waits for them to finish green.

② Semver level

  • skip-changeset is right: the diff is docs/adr/** only, which no published package ships.
  • Clause-②: the claim (6884480897, branch claude/project-thread-6cr30t) carries Clause-②: no, and that is right: nothing authorable narrows or widens. The PR body owes no Clause-②: line on a diff with no changeset; PR-body guards are green.

③ Boundary flags

④ Design judgment

File judged: the ADR line, against packages/plugins/plugin-security/src/position-renamed-holder-carry.ts, packages/cloud-connection/src/marketplace-install-local-plugin.ts, packages/objectql/src/plugin.ts, packages/objectql/src/registry.ts, packages/core/src/artifact-packages.ts, packages/runtime/src/domains/packages.ts and packages/metadata-protocol/src/protocol-package-install.ts, read on origin/main 3c0033f9.

The should-fix of 6889382518 (install-local names one id): fixed, truthfully.

  • "a hot install-local install or upgrade, for the package the door announces (...) ... carried at once": holds. The door announces once, changed: ['app/' + manifestId] (announceHotInstall, :3269 and :6805), where manifestId is the delivered artifact's parsed manifest.id (:2488). positionRenameReloadScope (:533-555) admits it while the registry holds that package, and the run judges only the claims whose holder is in scope (:588-589).
  • "the other packages of a multi-package artifact, which install-local registers but does not name ... are carried at the next restart": holds, both halves. Registers: the door hands the whole artifact to the manifest service (:3140), whose register resolves every packages[] entry (resolveArtifactPackageEntries, artifact-packages.ts :308) and calls ql.registerApp(manifest, ...) once per entry, each under its own id, in one restore run (objectql/src/plugin.ts :942-943, :1046-1047). Does not name: no second announce exists in the door (two metadata:reloaded call sites in the file, the install at :6805 and the uninstall at :3817, each with the one id). Next restart: the rehydrate re-registers the ledgered artifact inside kernel:ready and the boot run at kernel:bootstrapped (kernel.ts :619, :632) judges every claim.
  • Tried and not broken: the qualifier does not take away what round 1 accepted (a single-package upgrade is the announced package, pinned by marketplace-install-local-hot-resync.test.ts :304). A member that carries the artifact's own id is the announced package and is carried at once, as the item says. A member announced later by another door (an enable of a disabled member, a per-item publish of its position) is carried then, which the same list already states for those doors.

Nit 2 of 6889382518 (the disabled claimant): fixed, truthfully.

  • "nor carries holders onto a claimant whose package is disabled (refused claimant-disabled ...)": holds. A claim whose position belongs to a disabled package is read from the registry with disabled: true (disabledPackagePositions, :326; :580) and refused claimant-disabled (:645-647) on the boot run and on a reload run alike. Pinned: position-renamed-holder-carry.test.ts :339.
  • "... until an enable announces the package": holds for every door that enables. PATCH /packages/:id/enable announces only when the package was disabled before the switch (wasDisabled, packages.ts :2875, :2883), and a disabled claimant's package is exactly that case, so the conditional never bites here; an enable of an already-enabled package announces nothing and has nothing to carry (pinned, packages-reload-announce.test.ts :205). The other enabling door, an overwrite POST /packages with enableOnInstall: true, calls registry.enablePackage (:2726) and then announces app/ID unconditionally (:2808), so it is also "an enable [that] announces the package". Both are pinned on a real kernel: packages-reload-announce.test.ts :186 and :223. registry.enablePackage (registry.ts :11041) has no third HTTP caller; the in-process install primitive (protocol-package-install.ts :461) is reached with enableOnInstall by no door on main.
  • The disable announcement (fix(runtime): the package disable and DELETE routes announce the withdrawal #33546, packages.ts :2958) names a package the registry still holds, so the run judges its claims and refuses each claimant-disabled. It moves nothing and does not contradict "until an enable".
  • With this sentence in, the "carried at once" items read correctly for a package that is disabled when announced (an install that lands disabled, an install-local upgrade that keeps the row disabled): the refusals sentence now excepts it.

The rest of the line, re-read sentence by sentence on main: unchanged from 6889382518 and still holds: the two run points and "as the system, in every organization"; the refusal set (claimed-twice, still-declared, held-by-other, owned-by-other, switched-off, :624-657); "carried for its one claimant"; "the packages this boot loaded"; the scope spelling (app/ID while held, position/NAME); POST /packages (:2808); the enable that switches a disabled package on (:2883); the per-item publish and publish-drafts; the artifact reload that names only its file; "named in the log of the run ... never rewritten"; "nothing is carried back on a downgrade". No new false claim found.

Findings:

  1. nit — "until an enable announces the package" names one of two ends. The boot run also carries the claim once the package is enabled: when the enable's announce fails (announcePackageReload logs and says "restart the process", packages.ts :971-984), or when the stored package state changes between boots. The line's own next sentences say the carry "runs at boot over every claim", and the warning the code prints for this refusal names the boot (:688; PR docs(spec, plugin-security): the runtime package install, the enable of a disabled package and a hot upgrade carry renamedFrom holders at once #33642 makes it name both). Not false, slightly narrow. Accepted deviation, or one word on a later prose pass ("until an enable announces the package, or the next boot after it").
  2. nit — the parenthetical names the reason a disabled claimant gets when nothing earlier refuses it. A disabled claimant whose old name two positions claim, or a position still declares, is refused claimed-twice, still-declared or held-by-other first (:624-643). The holders are not carried either way, so the sentence's claim stands. Accepted deviation.
  3. nit — "the other packages of a multi-package artifact" assumes one member is the announced package. When no member carries the artifact's own id (the door's own note, :2566-2570), the door announces no held package and every member waits for the boot. The line's rule before the colon (app/ID while the registry holds package ID) covers it, and the conclusion (carried at the next restart) is the right one for all of them. Related, read but not traced end to end: a multi-package artifact's residual top-level items register under the artifact's own id with no package row (objectql/src/plugin.ts :1062-1071, :1083), so a residual position's claim would wait for the boot too in that same case. Both go away with install-local: a hot install of a multi-package artifact announces only the artifact's own id, so renamed-position holders of its other packages wait for the next boot #33656 if it announces every delivered id. Accepted deviation.
  4. nit — prose: "It does not carry ..., nor carries holders onto ..." wants "nor does it carry". No effect on the contract.
  5. nit — carried over, unchanged, from 6889382518 nit 3: logPositionRenameCarry does not repeat a warning identical to one the run before said (:710), so "named in the log of the run" has that one exception on the reload path. Accepted deviation.

Read, not reviewed (outside the diff), as in 6889382518: on main the spec describe (position.zod.ts :166-171), its generated row, the carry's module doc (:135-141) and REFUSAL_SENTENCE['claimant-disabled'] (:688) still say the runtime install and enable routes do not announce and that the first boot after the enable carries. PR #33642 corrects them; its text owes the same "for the package the door announces" qualifier until #33656 lands.

Implemented-by: claude/project-thread-6cr30t
Reviewed-by: session_01FEkQ5mswnWm181XgYcCUag

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:spec#1 · os-project-manager · session_01FEkQ5mswnWm181XgYcCUag

ACCEPT · PR #33653 (#33301 ADR 小修,Tier H) · head 1bb25336ec432a8d7e64303fa10e6082cb205f56 · 2026-11-15T05:41Z

维护者速读

席位核对

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:spec#1 · os-project-manager · session_01FEkQ5mswnWm181XgYcCUag

Tier H 待人工审批:席位记录 6889883597(ACCEPT @ 1bb2533),契约复审 PASS 6889535113。

@objectstack-fleet objectstack-fleet Bot added the pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue label Nov 15, 2026
@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 15, 2026 05:42
@os-zhuang
os-zhuang added this pull request to the merge queue Nov 15, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 15, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⛔ merge queue 构建失败 — 先分诊,再决定要不要重排

队列构建 43682313079 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集),
所以失败的测试可能在本 PR 没碰过的包里 —— 那不是重排能修的。每次盲目重排都会让排在后面的所有 PR 重建一轮。

分类:failure —— 按下面的日志分诊。

失败的 job(日志抽取,best effort):

  • Dogfood Regression Gate (1/3) — 失败步骤: Boot example apps and exercise real user flows

    @objectstack/dogfood:test:  FAIL   isolated  test/bare-name-one-holder-ai-family.dogfood.test.ts > agent, skill and tool names held per namespace, on a booted showcase > [#31985] a package-less tool r
      ↳ 失败原因: @objectstack/dogfood:test: Error: Test timed out in 5000ms.
    

↳ 失败原因 是判读的关键:超时(Test timed out in … / Hook timed out in …)多半是负载/时序,不是本 PR 的回归;
断言(AssertionError: …)才指向真实的行为改变。两者的 FAIL 行长得一模一样,只有这一行能区分。

⚠️ 断言这一侧有一类例外,判据是断言在测什么,不是它是不是 AssertionError。 断言的对象是产品行为(一个值、一个形状、一次拒收)⇒ 照上面读:真实的行为改变,去查,⛔ 不要重排掉;
断言的对象是这次实验自身的有效性前提(跑完的耗时、负载下的先后、任何只在时间预算内才成立的条件)⇒ 它跟超时是同一类,同样对负载敏感,重排一次是合法的判别手段。
识别是机械的:断言的消息或它比较的值本身点名了一段时长、一个时间戳、一个耗时计数。实测过的一对 —— AssertionError: SecurityPlugin.init() ran: expected false to be true 测的是产品行为(真回归);
AssertionError: this run took over a second, so second-precision stamps could have differed too: expected 1006 to be less than 1000 测的是实验前提:它守护的那条不变式当时是绿的,同一个 head 原样重排一次即成功。
穿着 AssertionError 外衣的时间测量,仍然是时间测量。(⛔ 这只改「怎么读一次红」,不改「哪些测试可以重排」——后者由别处管。)

跨 PR 相同签名(24h,按失败测试文件聚合):

历史信号:

  • 本 PR 过去 24h 无队列失败记录(首次)。
  • 过去 24h 队列共有 9 个失败构建(不含本次)。

分诊清单:

  1. 失败测试在本 PR 改动的包里 → 真回归,修 PR。
  2. 失败测试与本 PR 无关 → 看上面的「跨 PR 相同签名」;已有汇总 issue ⇒ flaky/环境问题实锤,去那张 issue 上谈,修好前重排只会再烧一轮全队列。
  3. 两者都不是 → 可能与同组 PR 语义冲突;等前面的 PR 落地或失败出队后再重排一次即可,不要连续重排。

Generated by Claude Code · merge-queue-triage workflow (#4859)

scbdzhwl pushed a commit to scbdzhwl/objectstack-analysis that referenced this pull request Nov 16, 2026
…of a disabled package and a hot upgrade carry renamedFrom holders at once (objectstack-ai#33642)

<!-- claude-projects-attribution: {"github_login":"os-project-manager"}
-->
_Requested by **Leehom** · [project
thread](https://claude.ai/code/project/chan_01TenzsRopZj4jMbvjX8uz1X?thread=cmsg_01TenzsRopZj4jMbvjX8uz1XXWfT73m4BSPgeTFD7644gK)_

Refs objectstack-ai#33301

Follow-up PR for the card (PR 1 objectstack-ai#33478 merged; PR 2 objectstack-ai#33568 is the
separate Tier H ADR leg). This one corrects the
`PositionSchema.renamedFrom` text that objectstack-ai#33448 and objectstack-ai#33304/objectstack-ai#33473 made
false on `main`.

## 维护者速读

- **改了什么**:只改文字与一条日志文案,不改行为。`PositionSchema.renamedFrom` 的 jsdoc 与
`.describe()`(及其生成的参考文档行)、`plugin-security` 迁移模块注释:运行时 `POST /packages`
安装、`PATCH /packages/:id/enable`
启用一个已停用的包、以及热升级,现在都"立即迁移",不再列为"等下次重启"。同时更正两条未发布的变更说明(同一句错话),以及
`claimant-disabled` 警告里"启用后的第一次启动才迁移"的说法。
- **为什么改**:objectstack-ai#33478 合入时写了"运行时安装/启用不发通告,要等重启",但 objectstack-ai#33448 已让两扇门发
`metadata:reloaded`;另外 objectstack-ai#33304 让热升级撤回旧版职位(objectstack-ai#33473 已在模块注释里改过),spec
文字还说要重启。契约评审 6886866329 指出前者。
- **风险与回滚**:无 schema、取值或行为变化;唯一发布的运行时字节是一条警告文案。`check-empty-changeset`
因有意更正两条未发布说明而保持红(DELIBERATE CORRECTION,见下)。回滚即 revert。
- **先看**:`packages/spec/src/identity/position.zod.ts` 的 `renamedFrom`
jsdoc 与 describe。
- **两分钟验证**:`git grep -n "do not announce\|does not announce, and"
packages/spec/src/identity content/docs/references/identity`,预期无命中;对照
`packages/runtime/src/domains/packages.ts` 里两处 `announcePackageReload`
调用。
- **需要你做的**:无,席位做契约复审并落地。

## What changes

Text only; no schema, accepted value or behaviour changes.

- `packages/spec/src/identity/position.zod.ts`, `renamedFrom` jsdoc: the
doors carried at once are now a hot install-local install **or
upgrade**, for the package the door announces, the runtime `POST
/packages` install, a `PATCH /packages/:id/enable` that switches a
disabled package on, a per-item publish and a publish-drafts. A package
still disabled when its announcement is heard is refused
`claimant-disabled` until the enable that switches it on announces it
again. The other packages of a multi-package artifact (install-local
announces only the artifact's own id, review 6889382518 on objectstack-ai#33653; the
code change is tracked in objectstack-ai#33656) and an artifact reload that names only
its file stay "at the next restart".
- Same file, `.describe()`: "(an install or hot upgrade of the package
the door announces, the enable of a disabled package, a per-item
publish, a publish of drafts). A package still disabled then is carried
when it is enabled. The other packages of a multi-package artifact, and
an artifact reload that names only its file, are carried at the next
restart."
- `position-renamed-holder-carry.ts` module doc: "When it runs" says a
hot install-local install or upgrade is carried at once for the package
the door announces, the other packages of a multi-package artifact at
the next restart; the `claimant-disabled` bullet (~:48-51) now names the
enable that carries, matching the warning reason.
- `content/docs/references/identity/position.mdx`: the `renamedFrom`
row, regenerated (`pnpm gen:schema && pnpm gen:docs`), not hand-edited.
-
`packages/plugins/plugin-security/src/position-renamed-holder-carry.ts`,
module doc "When it runs": the runtime install and the enable of a
disabled package announce `app/ID` and are carried at once; an install
that leaves the package disabled is refused `claimant-disabled` until
that enable.
- `.changeset/33301-renamed-from-install-enable-announce.md`:
`@objectstack/spec` patch.
- `position-renamed-holder-carry.ts` ~:690, the `claimant-disabled`
warning reason, FROM "the renamed position's package is disabled; the
first boot after it is enabled carries them" TO "the renamed position's
package is disabled; enabling it through `PATCH /packages/:id/enable`
carries them, and so does the first boot after it is enabled". No test
pins the string (`git grep` over `*.test.ts`); the only test of the
refusal asserts `reason: 'claimant-disabled'`. This string ships in
`dist`, so `.changeset/33301-claimant-disabled-log-reason.md` is an
`@objectstack/plugin-security` patch.
- Two pending release notes, corrected in place (see DELIBERATE
CORRECTION below).

### DELIBERATE CORRECTION of two pending release notes

`check-empty-changeset` stays red on purpose: both notes are unreleased
and describe the same doors, and restoring them would publish sentences
that are false on `main`.

- `.changeset/33301-renamed-from-carry-text.md` (this card's PR 1), FROM
"(a hot install, a per-item publish of the position, a publish of
drafts). A hot upgrade over a version the kernel still serves, a package
install or enable that does not announce, and an artifact reload that
names only its file are carried at the next restart." TO "(an install or
hot upgrade, the enable of a disabled package, a per-item publish of the
position, a publish of drafts). A package still disabled when it is
announced is carried when it is enabled; an artifact reload that names
only its file is carried at the next restart."
- `.changeset/33238-position-rename-hot-install.md` (objectstack-ai#33238): the bullet
"the runtime's package install and enable routes, which do not announce
`metadata:reloaded`;" is removed from "Still carried at the next
restart". "Carried at once" gains: "the runtime's package install (`POST
/packages`) and the enable of a disabled package (`PATCH
/packages/:id/enable`), which announce `app/ID` (`@objectstack/runtime`,
objectstack-ai#33302). A package still disabled when it is announced is not carried
until the enable switches it on and announces it again."

### Where each claim is read on `main` (1cf2a5a)

- Install announces on both answers:
`packages/runtime/src/domains/packages.ts` ~:2781
`announcePackageReload(deps, _context, pkgId, 'installed')`, before the
`enableOnInstall` lifecycle refusal returns.
- Enable announces only when the package was disabled: ~:2856 `if
(wasDisabled) await announcePackageReload(…, 'enabled')`. Pinned by
`packages-reload-announce.test.ts`.
- A disabled claimant is refused: `position-renamed-holder-carry.ts`
`claimant-disabled` (judged on the reload path as on boot), so an
install that lands disabled carries nothing until the enable announces.
- Hot upgrade: `SchemaRegistry.replacingPackageBody` (objectstack-ai#33050, landed in
objectstack-ai#33304) withdraws the positions the new body no longer ships inside
`registerApp`; objectstack-ai#33473 pinned it end to end through install-local and
already corrected the carry's module doc, but not the spec text.

### Deviation from the prepared patch

The order's patch (be318a6d) no longer applied: objectstack-ai#33473 had rewritten the
carry's module doc under it. It was re-applied by hand, and it kept "a
hot upgrade over a version the kernel still serves … carried at the next
restart", which objectstack-ai#33473 measured false. Re-asserting that in rewritten
text would claim more than the code does, so the same sentences drop it.
Round 2, at the seat's request, adds the warning string and the two
pending notes below.

## Tests

None: a description and comment diff, no behaviour change.

## Acceptance notes

- `@objectstack/plugin-security` changeset: the module-doc edit ships
nothing (tsup strips comments; after the build `grep -rl 'enable of a'
dist` has no hit), but the warning string does (`enabling it through` is
in `dist/index.js` and `dist/index.mjs`), so the package gets a patch
note for the string.
- Left as is, at the seat's word: objectstack-ai#33568's ADR-0150 wording still lists
"a hot upgrade over a version the running kernel still serves" as
carried at the next restart, false since objectstack-ai#33304. That is the card's ADR
follow-up after objectstack-ai#33568 merges.
Clause-②: no
Metadata-protocol: none

## Verification

At head `27a39b87` (`origin/main` `4c32b969` merged in), after building
the lint, plugin-security, objectql, client-react and cli closures:

- 106 derived gates (`dispatch-gates.mjs --commands --repo
objectstack-ai/objectstack`): 104 exit 0; `--ran` reads "106 derived
famil(ies) accounted for — 105 run, 1 NOT-MEASURED".
- `check-empty-changeset.mjs --base origin/main` exit 1: the DELIBERATE
CORRECTION above, red on purpose.
- NOT MEASURED: `check:dual-build-cjs-loads` (exit 3, a PREREQUISITE
refusal: it reads every package's `dist`). CI runs it.
- `pnpm --filter @objectstack/plugin-security test`: 267 files, 6679
passed, 45 skipped. `typecheck` exit 0.
- Round 1 at `63085567`: `pnpm --filter @objectstack/spec test` 840
files, 26871 passed, 1 todo; `gen:schema && gen:docs` moved only
`content/docs/references/identity/position.mdx`. Round 2 does not touch
`packages/spec`.

Round 3 at head `85543852` (`origin/main` `3c0033f9` merged in; the net
diff against main was unchanged by the merges): `pnpm --filter
@objectstack/spec test` 840 files passed, 1 skipped, 26878 passed; `pnpm
--filter @objectstack/plugin-security test` 267 files, 6679 passed, 45
skipped, `typecheck` exit 0 (at `a797bffe`; the round-3 edit after it is
comment and describe text only, and
`position-renamed-holder-carry.test.ts` 35/35 at `85543852`);
`gen:schema && gen:docs` moved only the `position.mdx` row;
`check:generated` (after a spec rebuild), `check:docs`,
`check:spec-docblock-symbol-anchors` and `check-issue-citations` exit 0.

Records: `pm-orders/spec/33301-followup-gates-ran.txt` (round 1) and
`pm-orders/spec/33301-followup-r2-gates-ran.txt` (round 2) in the
project share.

---
_Generated by [Claude
Code](https://claude.ai/code/session_01FEkQ5pKQmfpw66kCN9pAhn)_

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01FEkQ5pKQmfpw66kCN9pAhn

<!-- signed: domain:spec#1 · os-project-manager ·
session_01FEkQ5mswnWm181XgYcCUag -->

---------

Co-authored-by: Claude <noreply@anthropic.com>
scbdzhwl pushed a commit to scbdzhwl/objectstack-analysis that referenced this pull request Nov 16, 2026
…ree installs (objectstack-ai#33772)

<!-- claude-projects-attribution: {"github_login":"zhuangjianguo"} -->
_Requested by **Steedos** · [project
thread](https://claude.ai/code/project/chan_018ETKaNwMZCNRYD7D8Q9Ubb?thread=cmsg_018ETKaNwMZCNRYD7D8Q9Ubb5soSS5cRV6WrfiW2kCmgEp)_

Fixes objectstack-ai#33680

Clause-②: no
Metadata-protocol: none

## 维护者速读

- 改了什么:AI 家族 bare-name 测试里三条在 `it` 里装包的用例(无包工具行、CONTROL、第三命名空间),把行保存和
install-local 挪进嵌套 describe 的 beforeAll,读断言留在 it 里,断言逐字未改。
- 为什么改:每次 install-local 都会重同步整个 showcase(123 个对象 schema、33
条流程),装包占了用例的大部分耗时;在 merge queue 的分片负载下整条用例越过 vitest 默认 5 秒,两次把 PR
踢出队列(objectstack-ai#33451、objectstack-ai#33653)。
- 风险与回滚:只改测试文件,不改产品代码,不发布;回滚即 revert 本 PR。
-
先看:`packages/qa/dogfood/test/bare-name-one-holder-ai-family.dogfood.test.ts`
新的三个嵌套 describe(beforeAll 的 60 秒装包预算与其后的 it)。
- 两分钟验证:`cd packages/qa/dogfood && pnpm exec vitest run
--reporter=verbose
test/bare-name-one-holder-ai-family.dogfood.test.ts`,预期 28 个全绿,三条用例的 it
各在 0.5 秒内。
- 需要你做的:无,席位落地。

## What changes

Three pins in
`packages/qa/dogfood/test/bare-name-one-holder-ai-family.dogfood.test.ts`
move their setup out of the test clock:

- The `[objectstack-ai#31985]` package-less tool row case becomes a nested `describe`.
Its setup (two `PUT /meta/tool/NAME` saves, three `POST
/marketplace/install-local` calls in the same two install orders) runs
in that describe's `beforeAll` with a declared 60 s loading budget, like
the file's own boot hook. Its reads become `it.each(['before the
hydrator', 'after the hydrator'])`, run in declaration order; the
assertions are byte-identical to the old loop body.
- Folded in 9ebd6e3 (loose end R5): the `CONTROL — install-local ...
fresh ... names` (epsilon) and `[objectstack-ai#31701, objectstack-ai#31985] ... THIRD namespace`
(gamma) cases each become a nested `describe` whose `beforeAll` runs the
install-local (60 s loading budget) and asserts its status < 300; the
reads stay in the `it`, unchanged apart from indentation (`git diff -w`:
+13 −2). Declaration order is unchanged, so the co-owner refusal cases
still read the package list before epsilon and gamma install.

No assertion, test clock of a behaviour read, or product file changes.

## Why

Diagnosis (card objectstack-ai#33680, triage 6890622593):

- Both victims fail the same test at line 381 with REASON `Error: Test
timed out in 5000ms.`: 5139 ms in job 132667862849 (PR objectstack-ai#33451) and 5046
ms in job 132715484165 (PR objectstack-ai#33653). The dogfood config sets no
`testTimeout`, so this is vitest's default 5 s.
- The same test in 14 green merge_group runs of 2026-11-15 (43688903702
to 43695401645): 2220 to 4447 ms, median about 3.2 s. It sits at 45 to
90 % of its clock.
- Measured locally on an idle box (instrumented copy, not committed):
setup 2840 ms of the test, each install-local 828 to 1033 ms, the reads
164 ms and 147 ms. Each install logs `syncSchemas() ran`, `Schema sync
complete {"synced":123}` and `Re-synced 33 flow(s) after metadata
reload`.
- The triage's `No driver available for object 'sys_session'` lead does
not hold: 0 hits in victim 1, 1 hit in victim 2, and that line sits
inside another worker's boot log while this file's stack was still up.
- Sibling anchor objectstack-ai#33479 (flow family) has a different root: its root PR
objectstack-ai#33431 fails four assertions, a semantic conflict, not a clock.

So this is a load/timing cliff in the test's structure: a behaviour
clock timing loading. Not a flake in the product, not a race, not a
conflict between queued PRs.

## Tests

- Red before the fix, reproduced: the file under 6 CPU-bound node loops
on a 4-core box failed exactly like CI (`Test timed out in 5000ms`, 5630
ms).
- Green after, same load, twice on 24c4208 and once on the merged head
fad7b8d: 28/28; the two hydrator reads took 220 to 381 ms.
- On 9ebd6e3: the file 28/28 idle and twice under 6 CPU hogs on 4
cores; the epsilon and gamma `it`s now take 131 to 320 ms (1030 and 1159
ms idle as single `it`s before).
- `pnpm --filter @objectstack/dogfood typecheck`: exit 0 (`--listFiles`
includes the file).
- `pnpm lint`: exit 0.

## Acceptance notes

- No ablation: the diff changes no tested behaviour, only where the
setup's time is clocked.
- The two sibling cases are folded in 9ebd6e3 (see What changes).
- Not done here (one loose-ends card after landing): each install-local
re-syncing the whole deployment (123 schemas, 33 flows) is a product
cost worth its own measurement if the queue keeps hitting install-heavy
files.
- Full dogfood battery not run locally (no `!` in the title, no
narrowing arm); the queue's Dogfood Regression Gate carries it.

## Verification

<details><summary>Derived gates (dispatch-gates --commands)</summary>

At 24c4208: 52 derived, 52 run, every one exit 0; `dispatch-gates
--ran` reconciles 52/52 with 0 NOT-MEASURED.
`check:dual-build-cjs-loads` first answered exit 3 (workspace not built)
and was rerun green after the full build. At 9ebd6e3: the same 52
families re-derived and rerun, all exit 0, 52/52, 0 NOT-MEASURED.

</details>

## Human Minimum

- [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic.
- [x] 2. Every name I added uses the casing for its kind.
- [x] 3. No formatter ran; `pnpm lint` passes.
- [x] 4. One issue, one branch off an up-to-date `main`, one pull
request.
- [x] 5. A change that publishes carries a changeset, and both
declaration lines are filled in here and in the changeset.
- [x] 6. `packages/spec` touched: its generated artifacts are
regenerated and committed.
- [x] 7. No hand edits to `content/docs/references/`,
`packages/*/CHANGELOG.md` or `content/docs/releases/`.
- [x] 8. Title, body and comments are in English.
- [x] The *Before Submitting* list in CONTRIBUTING.md is done.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01QsR2jRabTH2KkTRU4d62Uq

<!-- signed: domain:server#5 · zhuangjianguo ·
session_01QsR2jTEivi2wogPpeo3xd5 -->

---------

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue size/xs skip-changeset PR has no user-facing published change; bypasses the changeset gate

Projects

None yet

2 participants